The present invention relates to computer systems that generate graphics and more particularly to generating 3-dimensional (3D) graphics.
Software application programs that utilize increased graphics have become more prevalent. For example, video games often utilize an increasing amount of 3D graphics for display on a typical personal computer (PC) monitor. These graphics applications require the computer system to include 3D rendering software to support the graphical content. FIG. 1 is a block diagram illustrating a conventional computer system for executing typical graphics application programs and displaying the graphics.
Referring to FIG. 1, computer system 10 may be implemented, for example, as a Pentium-based PC utilizing a Windows 9x or Windows NT operating system from Microsoft Corporation. Computer system 100 includes a software portion 12 and a hardware display portion 14. The software portion 12 includes an application program 16, an operating system 3D rendering engine 18 and a third party 2-dimensional (2D) display driver 20. The application 16 generates function calls to the operating system (OS) of computer system 10 to perform OS services. Specifically, the application 16 generates function calls to 3D rendering engine 18, also referred to as a graphics module, via the operating system""s defined applications programmer interface (API).
The 3D rendering engine 18 performs operations associated with graphics, for example tracking the state of a scene, caching geometry and textures into their internal representations, customizing rendering engine 18 according to the application calls, etc. The 3D rendering engine 18 manipulates the 3D objects it processes using temporary buffers, such as stencil buffers and Z-buffers and one or more final result 2D buffers for a rendered frame.
After performing 3D rendering, the application 16 instructs 3D rendering engine 18 to render the scene into a resultant frame buffer via the 2D display driver 20. The 3D rendering engine communicates with the 2D display driver 20 via the operating system""s API. The 3D rendering engine 18 renders the 3D scene into a final 2D image in the frame buffer, typically located in 2D display adapter 22. The 2D display adapter then converts the video data in the frame buffer to analog video (RGB) signals, and display monitor 24 displays the final image.
A drawback with the software rendering architecture illustrated in FIG. 1 is that the output from 3D rendering engine 18 is merely a 2-dimensional (2D) image in a frame buffer of the 2D display adapter 22. The 2D image is then output to monitor 24, such as a conventional PC monitor. Accordingly, the software rendering architecture is unable to generate stereoscopic 3D content.
Additionally, in other systems utilizing hardware rendering architectures, 3D acceleration devices may be used to execute some or all of the rendering requests in hardware. However, the resulting output of the 3D rendering is still merely a 2D image in the frame buffer of the 3D accelerator. Accordingly, in systems using hardware rendering architectures, the system is unable to generate stereoscopic 3D content.
There exists a need for an arrangement in a computer system that enables the generation of stereoscopic 3D images for graphic objects, e.g., for head-mounted displays.
There is also a need for an arrangement that enables stereoscopic 3D images to be generated and output using conventional hardware drivers and 3D acceleration hardware.
These and other needs are met by the present invention, where a stereoscopic filter intercepts calls from an operating system graphics module to a display driver requesting 3D rendering operations on a graphic object. The filter then generates stereoscopic image data for a left eye viewpoint and a right eye viewpoint that is then stored in a frame buffer. The output from the display driver can then be converted to analog video signals and output to a stereoscopic display device.
According to one aspect of the invention, a method is provided for generating 3D data for a graphic object. The method includes generating, in a 3D rendering module, a function call request for a 3D rendering operation for the graphic object. The method also includes receiving the function call request by a filter and generating a plurality of viewpoint data for the 3D graphic object. Another aspect of the present invention provides a computer-readable medium that includes stored sequences of instructions that are executed by a processor. The instructions cause the processor to receive a function call generated by a 3D rendering module requesting a 3D operation for a graphics object. The instructions also cause the processor to generate a plurality of viewpoint data for the graphics object.
Other objects and advantages of the present invention will become readily apparent to those skilled in this art from the following detailed description. The embodiments shown and described provide illustration of the best mode contemplated for carrying out the invention. The invention is capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawings are to be regarded as illustrative in nature, and not as restrictive.